<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    <link href="${pageContext.request.contextPath}/css/layout.css" rel="stylesheet" type="text/css"/>
    <link href="${pageContext.request.contextPath}/css/add.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.x.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/cascadingMenu.js"></script>
    <script type="text/javascript">
    </script>
</head>
<body>
<div class="place"><span>位置：</span>
    <ul class="placeul">
        <li><a href="${pageContext.request.contextPath}/backend/product/index" target="center">商品列表</a></li>
        <li><a href="#">修改</a></li>
    </ul>
</div>
<div class="formbody">
    <div class="usual">
        <div class="tabson">
            <form:form action="create" method="post" id="addgoodForm" enctype="multipart/form-data"
                       modelAttribute="product">
                <ul class="forminfo">
                    <li>
                        <label>商品缩略图<b>*</b></label>
                        <input name="imgMainfile" id="thumbImage" type="file" multiple="multiple"/>
                    </li>
                    <li>
                        <label>商品名称<b>*</b></label>
                        <input name="name" id="goodsName" type="text" class="dfinput" value="请填写商品名称"
                               required="required" style="width:500px;"/>
                    </li>
                    <li>
                        <label>商品类别<b>*</b></label>
                        <div class="vocation">
                            <select class="select3" name="type" id="goodsType">
                                <c:forEach items="${types}" var="type">
                                    <%--@elvariable id="type" type="com.blog.entity.ProductType"--%>
                                    <option value="${type.id}">${type.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                    </li>
                    <li>
                        <label>商品原价<b>*</b></label>
                        <input name="price" id="unitPrice" class="dfinput" type="number" required="required"
                               style="width:100px;"/>元
                    </li>
                    <li>
                        <label>售价<b>*</b></label>
                        <input name="finalPrice" id="groupPrice" class="dfinput" type="number" required="required"
                               style="width:100px;"/>元
                    </li>
                    <li>
                        <label>库存<b>*</b></label>
                        <input name="qty" id="goodsNumber" type="number" class="dfinput" required="required"
                               style="width:100px;"/>
                        件
                    </li>
                    <li>
                        <label>详情<b>*</b></label>
                        <textarea name="content" required="required" class="dfinput">
                        </textarea>
                    </li>
                    <li><label>&nbsp;</label>
                        <input type="submit" class="btn" id="btnPublish" value="马上发布"/>
                    </li>
                </ul>
            </form:form>
        </div>
    </div>
</div>
</body>
</html>